import { RouteRecordRaw } from 'vue-router';
import Layout from '@/views/home/Layout.vue';

export const appRoutes: RouteRecordRaw[] = [
  {
    path: '/app',
    component: Layout,
    redirect: '/app/list',
    meta: { title: '应用管理', icon: 'Grid', funcodeId: 'app' },
    children: [
      {
        path: 'list',
        name: 'AppList',
        component: () => import('@/views/app/AppList.vue'),
        meta: { title: '应用列表', funcodeId: 'app:list' }
      },
      {
        path: 'create',
        name: 'AppCreate',
        component: () => import('@/views/app/AppCreate.vue'),
        meta: { title: '创建应用', funcodeId: 'app:create' }
      },
      {
        path: 'detail/:id',
        name: 'AppDetail',
        component: () => import('@/views/app/AppDetail.vue'),
        meta: {
          title: '应用详情',
          funcodeId: 'app:detail',
          activeMenu: '/app/list'
        }
      }
    ]
  }
];
